<template>
  <div class="">
    <!-- 头顶 -->
    <head-bar></head-bar>
    <!-- 为了换行 -->
    <second-bar></second-bar>
    <!-- 菜单栏 -->
    <sider-bar></sider-bar>
    <!-- 内容 -->
    <div class="content-box">
      <div class="content">
        <router-view />
        <el-backtop target=".content"></el-backtop>
      </div>
    </div>
  </div>
</template>

<script>
import SiderBar from '@/components/SiderBar.vue';
import HeadBar from '@/components/HeadBar.vue';
import SecondBar from '@/components/SecondBar.vue';
import UserType from '@/common/userType.js';
export default {
  components: { SiderBar, HeadBar,SecondBar },
  name: "Container",
  methods: {
    //进入初始页面
    // redirectHome(userType) {
    //   if(userType == UserType.admin) {
    //     this.$router.push({ name: "admin-home" });
    //   }
    // }
  },
  created () {
    //判断登录状态
    // this.$router.push({ name: "Container" });  
    //this.redirectHome(3);//假设直接进入管理员页
  },
}
</script>

<style scoped>
.home{
    margin: 0px;
    border: 0px;
    padding: 0px;
}
.content-box {
  position: absolute;
  left: 170px;
  right: 0;
  top: 114px;
  bottom: 0;
  background: #fff;
  border-left: 1px solid #E4E7ED;
}

.content {
  width: auto;
  height: 100%;
  overflow-y: scroll;
  box-sizing: border-box;
}
::-webkit-scrollbar{
  display: none;
}
</style>